<?php

class StateEvening implements State
{
    public function writeProgram(Work $work)
    {
        if ($work->getHour() < 19) {
            fwrite(STDOUT, '晚上' . $work->getHour() . '点，收拾一下准备下班了' . "\n");
        } else {
            if ($work->getWorkState()) {
                fwrite(STDOUT, '晚上' . $work->getHour() . '点，下班了，回家看剧' . "\n");
            } else {
                fwrite(STDOUT, '晚上' . $work->getHour() . '点，苦逼加班中' . "\n");
            }
        }
    }
}